GNU MediaGoblin

<!-- support mediagoblin -->
<script src="/js/extlib/jquery/jquery-1.8.2.min.js"></script>

<script>
$(document).ready(function(){
  var cpid    = 8;
  var jsonvar = eval('jsondata' + cpid);
  var goal = jsonvar.money_target;
  var moneyRaised = jsonvar.money_raised_percentage;
  var percentWidth = moneyRaised.split('%')[0];
  if ( percentWidth > 100 ) {
      moneyRaised = '100%';
  }

  if ( percentWidth == 0) {
    $(".campaign_counter_bar").animate({width: "0.5%"}, 1000);
  } else {
    $(".campaign_counter_bar").animate({width: moneyRaised}, 1000);
  }

  $("#raised_percentage").html(moneyRaised);
  $("#raised_info").html(jsonvar.money_raised);
});
</script>

<script type="text/javascript"
        src="https://crm.fsf.org/sites/all/modules/civicrm//extern/widget.php?cpageId=8&widgetId=7&format=3"></script>

      <div class="grid_16 alpha omega campaign_counter_container">
      <a href="https://crm.fsf.org/civicrm/contribute/transact?reset=1&id=8"><div class="campaign_counter"><div class="campaign_counter_bar"></div><p><span id="raised_info">Raised $ of $ 60,000.00</span></p></div></a>
      <p>
        ... that's <span id="raised_percentage">0%</span>!
<%
import datetime
daysleft = (datetime.date(2012, 11, 9) - datetime.date.today()).days
if daysleft == 1:
    print "Only 1 day left!"
elif daysleft == 0:
    print "Last day to donate!"
elif daysleft > 0:
    print "Only %s days left!" % daysleft
else:
    print "0 days left!"
%>
        Support MediaGoblin! 
        <a href="https://crm.fsf.org/civicrm/contribute/transact?reset=1&id=8" class="campaign_donate"><img src="/images/campaign/heart.png" alt="<3" />Donate...</a></p>
      </div>
      <div class="clear"></div>
<!-- support mediagoblin -->

<div class="grid_6">
  <a href="/pages/tour.html"
     ><img src="/images/home_goblin.png"
           alt="Goblin holding screenshot" /></a>
</div>
<div class="grid_10">
  <ul class="feature_bullets">
    <!-- Why yes there are a couple of commented out bits here.
         We'll be uncommenting them in upcoming releases. ;) -->
    <li class="play_bullet">The perfect tool to <b>show and share your media!</b></li>
    <li class="world_bullet">Building tools to empower the world through <b>decentralization!</b><!-- and <b>federation!</b>--></li>
    <li class="extensibility_bullet">Built for <b>extensibility</b>.  Multiple media types, including video support!</li>
    <li class="freedom_bullet">Part of the <a href="http://gnu.org/">GNU project</a> and devoted to <b>user freedom</b>.</li>
    <li class="community_bullet">Powered by a community of <b>people like you</b>.</li>
  </ul>
  <p>Learn more about these features by <a href="/pages/tour.html">taking the tour →</a></p>
  <!-- <p class="campaign_link"><a href="/pages/campaign.html"><img src="/images/campaign/gavroche_cropped.png" alt="Gavroche says support MediaGoblin!" /></a><a class="campaign_link_link" href="/pages/campaign.html">We're currently running a campaign to support MediaGoblin! Check it out here →</a></p> -->
</div>

<div class="clear"></div>

<div class="grid_16 call_to_action">
  <h1>Get started with the latest MediaGoblin release:</h1>
</div>

<div class="clear"></div>

<div class="grid_5">
  <h2>Run it</h2>
  <p>Learn more about running your own instance of MediaGoblin.</p>
  <p>Check out our step-by-step <a href="http://docs.mediagoblin.org/">guide to installing MediaGoblin</a> on your own server.</p>
</div>

<div class="grid_5">
  <h2>Use it</h2>
  <p>Get started using Mediagoblin with an existing community.</p>
  <p><a href="http://wiki.mediagoblin.org/Live_instances">Find sites already running MediaGoblin</a>.</p>
</div>

<div class="grid_1 connector">
  &amp;
</div>

<div class="grid_5">
  <h2>Join us</h2>

  <p>MediaGoblin is built by a vibrant and friendly community of people like you!</p>
  <p>Learn more about <a href="/pages/join.html">getting involved</a> or <a href="http://wiki.mediagoblin.org/HackingHowto">setting up a local instance for development</a>!</p>
</div>

<div class="clear"></div>

<div class="grid_8">
  <h3>Latest blog headlines</h3>
  <p><a href="http://mediagoblin.org/news/index.xml"><img class="icon_feed" src="images/icon_feed.png" alt="Feed icon" /></a>Add the <a href="http://mediagoblin.org/news/index.xml">feed</a> to receive these automatically.</p>
<%
# This creates a list of the last 5 news entries for the front
# page.
# wgkg 10/8/2011

from Pyblosxom.tools import walk
from Pyblosxom.entries.fileentry import FileEntry
from urlparse import urljoin
from Pyblosxom.tools import urlencode_text, escape_text

config = request.get_configuration()
data = request.get_data()
filelist = walk(request, config['datadir'])
entrylist = [FileEntry(request, e, config['datadir'])
             for e in filelist]
entrylist.sort(key=lambda e: 0 - e._mtime)
entrylist = entrylist[:5]

print '<ul>'
for entry in entrylist:
    url = urljoin(config.get('base_url', ''),
                  urlencode_text(entry.get('file_path')))
    title = escape_text(entry.get('title'))
    print '<li><a href="%s">%s</a>' % (url, title)
print '</ul>'
%>

</div>

<div class="grid_8">
  <h3>Stay in touch!</h3>
  <p>There are many ways to stay in touch with mediagoblin:</p>
  <ul>
    <li>Follow and talk to us on <a href="http://identi.ca/mediagoblin/">Identi.ca</a> and <a href="https://joindiaspora.com/u/mediagoblin">Diaspora</a></li>
    <li>Subscribe to our <a href="http://lists.mediagoblin.org/listinfo/devel">mailing list</a></li>
    <li>Add the blog's <a href="http://mediagoblin.org/news/index.xml">RSS feed</a></li>
    <li>Join us <a href="/pages/join.html#irc">on IRC</a>:<br />
      #mediagoblin on irc.freenode.net
    </li>
  </ul>
</div>
